using Proto;

namespace sgf.server
{
    public class Program : BusActor
    {
        public static void Main(string[] args)
        {
            LogMgr.Init();
            //初始化配置
            Config.Init();
            IDGenerator.Init(1);
            HotfixMgr.Load();
            //初始化AreaCore
            var actorCore = new ActorCore();
            actorCore.AddActorBus<Program>();
            Console.ReadLine();
        }

        public override async Task OnStart(IContext context)
        {
            var actorCore = ActorCore.Core();
            actorCore.AddActorBus<DBActor>();
            actorCore.AddActorBus<OnlineActor>();
            actorCore.AddActorBus<NetActor>();
            actorCore.AddActorBus<AccountActor>();
            LogMgr.Debug("启动成功!");
            // actorCore.AddSystem<TestActor>();
            await Task.CompletedTask;
        }
    }
}